<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ViewPersonTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2" cellpadding="10" cellspacing="10">
                    <h:outputText value="#{bundle.ViewPersonLabel_perID}"/>
                    <h:outputText value="#{personController.selected.perID}" title="#{bundle.ViewPersonTitle_perID}"/>
                    <h:outputText value="#{bundle.ViewPersonLabel_firstName}"/>
                    <h:outputText value="#{personController.selected.firstName}" title="#{bundle.ViewPersonTitle_firstName}"/>
                    <h:outputText value="#{bundle.ViewPersonLabel_lastName}"/>
                    <h:outputText value="#{personController.selected.lastName}" title="#{bundle.ViewPersonTitle_lastName}"/>
                    <h:outputText value="#{bundle.ViewPersonLabel_gender}"/>
                    <h:outputText value="#{personController.selected.gender}" title="#{bundle.ViewPersonTitle_gender}"/>
                    <h:outputText value="#{bundle.ViewPersonLabel_dateOfBirth}"/>
                    <h:outputText value="#{personController.selected.dateOfBirth}" title="#{bundle.ViewPersonTitle_dateOfBirth}">
                        <f:convertDateTime pattern="MM/dd/yyyy" /> <!-- MM/dd/yyyy HH:mm:ss-->
                    </h:outputText>
                    <h:outputText value="#{bundle.ViewPersonLabel_address}"/>
                    <h:outputText value="#{personController.selected.address}" title="#{bundle.ViewPersonTitle_address}"/>
                    <h:outputText value="#{bundle.ViewPersonLabel_phone}"/>
                    <h:outputText value="#{personController.selected.phone}" title="#{bundle.ViewPersonTitle_phone}"/>
                    <h:outputText value="#{bundle.ViewPersonLabel_cardNo}"/>
                    <h:outputText value="#{personController.selected.cardNo}" title="#{bundle.ViewPersonTitle_cardNo}"/>
                    <h:outputText value="#{bundle.ViewPersonLabel_isVisiable}"/>
                    <h:outputText value="#{personController.selected.isVisiable}" title="#{bundle.ViewPersonTitle_isVisiable}"/>
                   <!--
                    <h:outputText value="#{bundle.ViewPersonLabel_student}"/>
                    <h:outputText value="#{personController.selected.student}" title="#{bundle.ViewPersonTitle_student}"/>
                    <h:outputText value="#{bundle.ViewPersonLabel_speaker}"/>
                    <h:outputText value="#{personController.selected.speaker}" title="#{bundle.ViewPersonTitle_speaker}"/>
                    <h:outputText value="#{bundle.ViewPersonLabel_cardTypeID}"/>
                    <h:outputText value="#{personController.selected.cardTypeID}" title="#{bundle.ViewPersonTitle_cardTypeID}"/>
                -->
                   </h:panelGrid>
                <br />
                <h:commandLink action="#{personController.destroyAndView}" value="#{bundle.ViewPersonDestroyLink}"/>
                <br />
                <br />
                <h:commandLink action="Edit" value="#{bundle.ViewPersonEditLink}"/>
                <br />
                <h:commandLink action="#{personController.prepareCreate}" value="#{bundle.ViewPersonCreateLink}" />
                <br />
                <h:commandLink action="#{personController.prepareList}" value="#{bundle.ViewPersonShowAllLink}"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.ViewPersonIndexLink}" action="/index" immediate="true" />

            </h:form>
        </ui:define>
    </ui:composition>

</html>
